import asyncio

from torrentp import TorrentDownloader

"""https://gitcode.com/gh_mirrors/to/torrentp/?utm_source=artical_gitcode&index=bottom&type=card&&isLogin=1"""
if __name__ == '__main__':
    path = "C:/Users/asyf/Desktop/"
    # 替换为实际磁力链接
    magnet_link = "magnet:?xt=urn:btih:bb8f7eab7ce0d8bd018000c1f5a34eb5eb733930&dn=zb%E6%97%A0x%E6%9D%80j.%E4%BF%AE%E6%AD%A3"
    downloader = TorrentDownloader(magnet_link, save_path=path)
    asyncio.run(downloader.start_download(download_speed=0,
                                          upload_speed=0))
